#include "sprite.h"
#include "func.h"
#include <heading\math\matrix_util.hpp>

DECLARE_EXTERN_GLEXTENSIONS

extern GLint rotation;

namespace sprite{

object::object(){

	this->SetAngle(0);
	this->SetRGBA(0,0,0,1);
	this->Setxy(0,0);
	this->SetDepth(0);

}

object::~object()
{
}

void object::Getxy(float &x, float &y) const{

	x=this->x;
	y=this->y;

}

void object::Setxy(const float x, const float y){
	
	this->x = x;
	this->y = y;

}

void object::GetRGBA(float& red, float& green, float& blue, float& alpha) const{

	Getvec4(this->RGBA,red,green,blue,alpha);

}

void object::SetRGBA(const float red, const float green, const float blue, const float alpha){
	
	Setvec4(this->RGBA,red,green,blue,alpha);

}

void object::GetDepth(float& dep) const{

	dep=this->depth;

}

void object::SetDepth(const float dep)
{
	this->depth = dep;
}

void object::GetAngle(float& angle) const{

	angle= this->angle;

}

void object::SetAngle(const float angle){

	this->angle=angle;
	SetRotationMatrix(angle);

}

}